// API响应类型定义

// 通用响应格式
export const ApiResponse = {
  code: Number,
  message: String,
  data: Object
}

// 分页响应格式
export const PaginationResponse = {
  code: Number,
  message: String,
  data: {
    list: Array,
    total: Number,
    page: Number,
    pageSize: Number
  }
}

// 用户相关类型
export const UserTypes = {
  // 登录请求
  LoginRequest: {
    username: String,
    password: String
  },

  // 注册请求
  RegisterRequest: {
    username: String,
    password: String,
    email: String,
    nickname: String
  },

  // 用户信息
  UserInfo: {
    id: Number,
    username: String,
    email: String,
    nickname: String,
    avatar: String,
    createTime: String,
    updateTime: String
  }
}

// 日记相关类型
export const DiaryTypes = {
  // 日记列表查询参数
  DiaryListParams: {
    page: Number,
    pageSize: Number,
    keyword: String,
    startDate: String,
    endDate: String,
    location: String
  },

  // 日记信息
  DiaryInfo: {
    id: Number,
    title: String,
    content: String,
    location: String,
    latitude: Number,
    longitude: Number,
    images: Array,
    weather: String,
    mood: String,
    createTime: String,
    updateTime: String,
    userId: Number
  },

  // 创建日记请求
  CreateDiaryRequest: {
    title: String,
    content: String,
    location: String,
    latitude: Number,
    longitude: Number,
    images: Array,
    weather: String,
    mood: String
  }
}

// 地点相关类型
export const LocationTypes = {
  // 地点信息
  LocationInfo: {
    id: Number,
    name: String,
    address: String,
    latitude: Number,
    longitude: Number,
    description: String,
    createTime: String
  },

  // 地点搜索参数
  LocationSearchParams: {
    keyword: String,
    latitude: Number,
    longitude: Number,
    radius: Number
  }
}

// 统计相关类型
export const StatsTypes = {
  // 旅行统计
  TravelStats: {
    totalDiaries: Number,
    totalLocations: Number,
    totalDays: Number,
    thisMonthDiaries: Number
  },

  // 月度统计
  MonthlyStats: {
    year: Number,
    month: Number,
    diaryCount: Number,
    locationCount: Number,
    diaryList: Array
  }
}
